﻿<html>

<head>

<!--COMMON :include style and javascript code-->
${inc:/action/pub/common}

<title>小区楼源信息</title>

</head>

<body onmouseup="hidInputValidatorTip(3);">
<!--a name="A0" id="A0"></a-->

<!--COMMON HEADER-->
${inc:/action/pub/header}

<center>

<TABLE class=table_comm cellSpacing=0 cellPadding=0 width="100%" border=0>
<tr>
<td>
<div id=tabs>
    <ul>
        <li id="tabsl">
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:return false;'>
                <span id="formTitleFilter">楼源管理查询</span>
            </a>
        </li>
		<li>
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:handTiaozheng();'>
                <span>手工调整</span>
            </a>
        </li>
		<li>
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:houseAllSearch();'>
                <span>楼源一览查询</span>
            </a>
        </li>
		<li>
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:locationInfo();'>
                <span>小区信息</span>
            </a>
        </li>
		<li>
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:locationJiedaoInfo();'>
                <span>街道信息</span>
            </a>
        </li>
    </ul>
    <div id='hline'></div>
</div>
</td>
</tr>
</table>
<!--filter form-->
<div id="divFilter" style="display:none;width:100%">
</div>

<!--addnew/edit form-->
<div id="divEditor" style="display:none;width:100%">
</div>

<!--insert/update response-->
<div id="divEditorResponse" style="display:none;width:100%">
</div>

<!--grid view response-->
<div id="response" style="display:none;width:100%">
</div>

<!--progress indicator-->
<div id="divStatus" class="alert" style="text-align:left; display:none;color:gray;width:150px;font-weight:bold;font-family:Arial">
	<img src="${def:context}/images/progress.gif"> 请稍候...
</div>

<!--show linked grid-->
<iframe id="detail" name="detail" marginwidth="0" scrolling="yes" frameborder="0" style="height:0%;width:100%;visibility:hidden">
</iframe>

<!--用于传递当前目录到header模版中-->
<input type="hidden" name="actionroot" id="actionroot" value="${def:actionroot}">

</center>

</body>

</html>

<SCRIPT LANGUAGE="JavaScript">

//设置界面元素数据验证逻辑
function setKeyPress(){
    return true;
}
function MyCheckDouble(val)
{
	var obj = document.forms["formEditor"].elements[val];
    var input = obj.value;
	if(input == ""){
		alert("此项不能为空！");
		obj.focus();
		obj.select();
		return false;
	} 
    var pos1 = input.indexOf(".");
    var pos2 = input.lastIndexOf(".");
    var charset = "1234567890.";
    if ((pos1 != pos2)||(!CheckChar(charset, input, true))) {
        alert ("请输入正确格式，只可包含数字和一个“.”！");
        obj.focus();
        obj.select();
        return false;
    }
	var output = eval((Math.round(input*100))/100);
	obj.value=output;
    
    return true;
}
//字段校验
function checkFields(){
	if(CheckNull("location_name","formEditor","请选择小区位置")) return false;
	if(CheckNull("room_type","formEditor","请选择户型")) return false;
	if(!CheckRadio("is_high_building","请选择房屋类型","","formEditor")) return false;
	if(!MyCheckDouble("jianzhu_area"))return false;
	if(!MyCheckDouble("jiesuan_area"))return false;
	if(!CheckNum("serial_no"))return false;
	if(!CheckNum("unit_no"))return false;
	if(!CheckNum("max_layer_no"))return false;
	if(!CheckNum("unit_no_small"))return false;
    return true;
}
</SCRIPT>



<script type="text/javascript">


function searchBack(){
    document.getElementById("divFilter").style.display = "";
    return true;
}

function addNewBackSetting(){
    return true;
}

function detailHidden()
{
	parent.formHidden();
}

function getRoom(max_layer_no,unit_no_small,serial_no,unit_no,start_unit_no,end_unit_no,start_layer_no,end_layer_no)
{
	if(max_layer_no=="") max_layer_no="0";
	if(unit_no_small=="") unit_no_small="0";
	if(start_unit_no=="") start_unit_no = "1";	/*未指定起始户号,则默认为1*/
	if(end_unit_no=="") end_unit_no = unit_no_small; 	/*未指定结束户号,则默认为户单元数*/

	if(start_layer_no=="") start_layer_no = "1";	/*未指定起始层数,则默认为1*/
	if(end_layer_no=="") end_layer_no = max_layer_no; 	/*未指定结束层数,则默认为最高层数*/
	
	var url = "${def:actionroot}/getroom?max_layer_no="+max_layer_no+"&serial_no="+serial_no+"&unit_no="+unit_no+"&start_unit_no="+start_unit_no+"&end_unit_no="+end_unit_no+"&start_layer_no="+start_layer_no+"&end_layer_no="+end_layer_no;
	ajaxCall(httpMethod="GET", 
			uri=url, 
			divResponse=null, 
			divProgress="divStatus", 
			formName=null, 
			afterResponseFn=null, 
			onErrorFn=null);
}

	//invoca la generacion de un PDF en un popup
	function openPDF()
	{
		var features = "height=500,width=800,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";
		var url = "${def:context}${def:actionroot}/pdf?random=" + Math.random();
		var w = window.open(url, null, features);
	}

	//invoca la generacion de un Excel en un popup
	function openExcel()
	{
		var features = "height=500,width=800,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";
		var url = "${def:context}${def:actionroot}/excel?random=" + Math.random();
		var w = window.open(url, null, features);
	}	


function showHouseDetailList(location_tuid,serial_no)
{
	$("detail").style.visibility = "visible"; 
	$("detail").style.height = "200%"; 
	$("detail").src ='${def:context}${def:actionroot}/roomlist/crud?location_tuid=' + location_tuid + '&serial_no=' + serial_no;
}

function showHouseDetailFlat(location_tuid,serial_no)
{
    //2010-6-11 anthony 平面图效果修改begin
    //$("detail").style.visibility = "visible"; 
    //$("detail").style.height = "200%"; 
    //$("detail").src ='${def:context}${def:actionroot}/roomflat/crud?location_tuid=' + location_tuid + '&serial_no=' + serial_no;
    var url = "${def:context}/action/dq/house/pubshow/crud?location_tuid="+location_tuid+"&serial_no="+serial_no;
    //document.location.href = url; 
    WinOpen(url, 14, "louyuanpingmiantu"+location_tuid+serial_no);
    //2010-6-11 anthony 平面图效果修改end
}

function distHouse(location_tuid,serial_no)
{
	$("detail").style.visibility = "visible"; 
	$("detail").style.height = "200%"; 
	$("detail").src ='${def:context}${def:actionroot}/roomdist/crud?location_tuid=' + location_tuid + '&serial_no=' + serial_no;
}


function formHidden()
{
	$("detail").style.visibility = "hidden"; 
	$("detail").style.height = "0%"; 
	search();
}
loadEditor();
loadFilter(search);


//楼源管理
function houseManage(){
    var url = "${def:context}/action/dq/house/crud";
    document.location.href = url; 
}
//手工调整
function handTiaozheng(){
    var url = "${def:context}/action/dq/yewu/tiaozheng/crud";
    document.location.href = url; 
}
//楼源一览查询 
function houseAllSearch(){
    var url = "${def:context}/action/dq/chaxun/yilian/crud";
    document.location.href = url; 
}
//小区信息 
function locationInfo(){
    var url = "${def:context}/action/dq/location/crud?flag=xiaoqu";
    document.location.href = url; 
}
//街道信息 
function locationJiedaoInfo(){
    var url = "${def:context}/action/dq/location/crud?flag=jiedao";
    document.location.href = url;
}
</script>
    